#ifndef POINTDRAWER_H
#define POINTDRAWER_H

#include <QFrame>
#include <QtGui/QWidget>
 #include <QPainter>

namespace Ui {
    class PointDrawer;
}

class PointDrawer : public QWidget
{
    Q_OBJECT
private:
    QPainter p;

public:
    PointDrawer(QWidget* parent = 0): QWidget(parent) {}
        virtual void paintEvent(QPaintEvent *) {
        p.begin(this);
        p.setPen(QPen(Qt::black, 3));
        int n = 8;
        int i=1;
        while(i<=n ) {
            qreal fAngle = 2 * 3.14 * i / n;
            qreal x = 50 + fAngle * 0.4;
            qreal y = 50 + fAngle * 0.4;
            p.drawPoint(QPointF(x, y));
            i++;
        }
        p.end();
        }

    ~PointDrawer();

private:
    Ui::PointDrawer *ui;
};

#endif // POINTDRAWER_H
